đŠī¸ Addy
Welcome to Addy, the Addy class is responsible for managing cloud configurations and interacting with rbx-cloud services. Follow this guide to learn how to utilize its powerful features for your Roblox projects!
đĻ Installationâ
You can install the Addy package either via Wally or directly from the Roblox Toolbox (Tutorial Here)
đ Usage Example
â
Creating an Instance of Addyâ
To get started, create a new instance of the Addy class using your cloud configuration:
local Addy = require(Packages.Addy)
local cloudConfig = {
universeId = 123456789,
authToken = "your-auth-token",
CloudConfigEnum = Addy.CloudConfigEnums.SerialIndex,
MaxRetries = 3,
RetryDelay = 5,
}
local addyInstance = Addy.new(cloudConfig)
Retrieving a Serial Numberâ
You can retrieve a serial number for a unique ID using the GetSerial method:
local uniqueId = "item12345"
addyInstance:GetSerial(uniqueId):andThen(function(serialNumber)
print("Serial number for " .. uniqueId .. ": " .. serialNumber)
end):catch(function(error)
warn("Failed to retrieve serial: " .. error)
end)
Retrieving Multiple Serial Numbers (Bulk)â
You can retrieve serial numbers for multiple unique IDs using GetBulkSerial:
local uniqueIds = {"item12345", "item67890", "item111213"}
addyInstance:GetBulkSerial(uniqueIds):andThen(function(serialNumbers)
for i, serial in ipairs(serialNumbers) do
print("Serial for " .. uniqueIds[i] .. ": " .. serial)
end
end):catch(function(error)
warn("Failed to retrieve serials: " .. error)
end)
Synchronous Retrieval (Optional)â
If you prefer synchronous operations, you can use the GetSerialAsync and GetBulkSerialAsync methods:
local serial = addyInstance:GetSerialAsync("item12345")
print("Synchronous serial number: " .. (serial or "Failed"))
local bulkSerials = addyInstance:GetBulkSerialAsync({"item12345", "item67890"})
print("Synchronous bulk serials: ", bulkSerials)
Cleanupâ
Once you're done with the Addy instance, make sure to properly clean it up:
addyInstance:Destroy()